package cn.yerly.sakura.dao.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
 * 订单
 * @author yerly
 *
 */
@Entity
@Table(name="`order`")
public class Order {
	@Id
	private Long id;
	@ManyToOne
	private User user;
	@ManyToOne
	private Shop shop;
	@ManyToOne
	private UserAddress userAddress;
	private Integer state;
	private Double totalPrice;
	private Double shippingPrice;
	private String remark;
	private Integer type;
	private Date ctime;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Shop getShop() {
		return shop;
	}

	public void setShop(Shop shop) {
		this.shop = shop;
	}

	public UserAddress getUserAddress() {
		return userAddress;
	}

	public void setUserAddress(UserAddress userAddress) {
		this.userAddress = userAddress;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public Double getShippingPrice() {
		return shippingPrice;
	}

	public void setShippingPrice(Double shippingPrice) {
		this.shippingPrice = shippingPrice;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "Order [id=" + id + ", user=" + user + ", shop=" + shop
				+ ", userAddress=" + userAddress + ", state=" + state
				+ ", totalPrice=" + totalPrice + ", shippingPrice="
				+ shippingPrice + ", remark=" + remark + ", type=" + type
				+ ", ctime=" + ctime + ", disabled=" + disabled + "]";
	}

}
